# 用户输入查询日期和时间，可返回对应的课表信息；用户查询当前时间，可返回当前课表信息
day = input("请输入你要查询的星期：（如：一）")
time = input("请输入你要查询的时段：（如：3-5）")

if day == "一":
    if time == "8-9":
        print("证券投资方法与技巧")
    else:
        print("这个时间没有课")
if day == "二":
    if time == "1-2":
        print("毛概实践")
    elif time == "6-7":
        print("Ai")
    elif time == "10-11":
        print("大英")
    else:
        print("这个时间没有课")
if day == "三":
    if time == "1-3":
        print("毛概理论")
    elif time == "12-14":
        print("python")
    else:
        print("这个时间没有课")
if day == "四":
    if time == "1-2":
        print("大英")
    elif time == "4-5":
        print("科学技术发展史")
    elif time == "8-10":
        print("网站运营与管理")
    elif time == "12-14":
        print("API机器学习与人工智能")
    else:
        print("这个时间没有课")
if day == "五":
    if time == "1-2":
        print("篮球")
    else:
        print("这个时间没有课")

from datetime import datetime
dayOfWeek = datetime.now().isoweekday()
import datetime

# 范围时间
d_time = datetime.datetime.strptime(str(datetime.datetime.now().date()) + '14:30', '%Y-%m-%d%H:%M')
d_time1 = datetime.datetime.strptime(str(datetime.datetime.now().date()) + '16:00', '%Y-%m-%d%H:%M')
d_time2 = datetime.datetime.strptime(str(datetime.datetime.now().date()) + '8:00', '%Y-%m-%d%H:%M')
d_time3 = datetime.datetime.strptime(str(datetime.datetime.now().date()) + '9:30', '%Y-%m-%d%H:%M')
d_time4 = datetime.datetime.strptime(str(datetime.datetime.now().date()) + '12:50', '%Y-%m-%d%H:%M')
d_time5 = datetime.datetime.strptime(str(datetime.datetime.now().date()) + '14:20', '%Y-%m-%d%H:%M')
d_time6 = datetime.datetime.strptime(str(datetime.datetime.now().date()) + '16:10', '%Y-%m-%d%H:%M')
d_time7 = datetime.datetime.strptime(str(datetime.datetime.now().date()) + '17:35', '%Y-%m-%d%H:%M')
d_time8= datetime.datetime.strptime(str(datetime.datetime.now().date()) + '18:45', '%Y-%m-%d%H:%M')
d_time9 = datetime.datetime.strptime(str(datetime.datetime.now().date()) + '20:55', '%Y-%m-%d%H:%M')
d_time10 = datetime.datetime.strptime(str(datetime.datetime.now().date()) + '10:35', '%Y-%m-%d%H:%M')
d_time11 = datetime.datetime.strptime(str(datetime.datetime.now().date()) + '12:00', '%Y-%m-%d%H:%M')



# 当前时间
n_time = datetime.datetime.now()

# 判断当前时间是否在范围时间内
if dayOfWeek <= 5:
    if dayOfWeek == 1:
        if n_time > d_time and n_time < d_time1:
            print("投资")
        else:
            print("没课")
    elif dayOfWeek == 2:
        if n_time > d_time2 and n_time < d_time3:
            print("毛概实践")
        if n_time > d_time4 and n_time < d_time5:
            print("Ai")
        if n_time > d_time6 and n_time < d_time7:
            print("大英")
        else:
            print("没课")
    elif dayOfWeek == 3:
        if n_time > d_time2 and n_time < d_time3:
            print("毛概理论")
        if n_time > d_time8 and n_time < d_time9:
            print("python")
        else:
            print("没课")
    elif dayOfWeek == 4:
        if n_time > d_time2 and n_time < d_time3:
            print("大英")
        if n_time > d_time10 and n_time < d_time11:
            print("科学技术发展史")
        if n_time > d_time and n_time < d_time1:
            print("网站运营与管理")
        if n_time > d_time8 and n_time < d_time9:
            print("API")
        else:
            print("没课")
    elif dayOfWeek == 5:
        if n_time > d_time2 and n_time < d_time3:
            print("篮球")
        else:
            print("没课")



